package com.foreknow.demo4;

public class MethodOverload {
    public MethodOverload(){
        System.out.println("11111");
    }
    public MethodOverload(String name){
        System.out.println(name);
    }
    public int add(int a,int b){
        return a+b;
    }
    public int add(int a,int b,int c){
        return a+b+c;
    }
    public static void main(String[] args) {
        MethodOverload overload = new MethodOverload();
        MethodOverload overload1 = new MethodOverload("tom");
        int sum = overload.add(1,2,3);
        System.out.println(sum);
    }
}
